package com.wjj.common.mybatis.config;
import com.mybatisflex.core.audit.AuditManager;
import com.mybatisflex.core.audit.ConsoleMessageCollector;
import com.mybatisflex.core.audit.MessageCollector;

/**
 * @author wujunjie
 * @version 1.0
 * @date 2025/07/30 - 11:24
 */
public class MyBatisFlexPrintLogConfig {

    public MyBatisFlexPrintLogConfig() {
        //开启审计功能
        AuditManager.setAuditEnable(true);

        //设置 SQL 审计收集器
        MessageCollector collector = new ConsoleMessageCollector();
        AuditManager.setMessageCollector(collector);
    }
}
